using System;
using System.Collections.Generic;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public enum ChuyenBayBUSResult
    {
        OK,DAOERROR, CAPNHATDAOERROR
    }
    public class ChuyenBayBUS
    {
        public static ChuyenBayBUSResult ChonHetChuyenBay(List<DTO.ChuyenBay> ds)
        {
            if(DAO.ChuyenBayDAO.ChonHetChuyenBay(ds))
                return ChuyenBayBUSResult.OK;
            return ChuyenBayBUSResult.DAOERROR;
        }
        public static ChuyenBayBUSResult ThemChuyenBay(DTO.ChuyenBay cb)
        {
            if (DAO.ChuyenBayDAO.ThemChuyenBay(cb))
                return ChuyenBayBUSResult.OK;
            return ChuyenBayBUSResult.DAOERROR;
        }
        public static ChuyenBayBUSResult CapNhatChuyenBay(DTO.ChuyenBay cb)
        {
            if (DAO.ChuyenBayDAO.CapNhatChuyenBay(cb) ==true)
                return ChuyenBayBUSResult.OK;
            return ChuyenBayBUSResult.CAPNHATDAOERROR;
        }
       
    }
}
